package cn.com.bdqn.dao;

import cn.com.bdqn.entity.SyMeterType;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SyMeterTypeDao {

    @Select("select * from sy_metertype")
    public List<SyMeterType> queryAll();

    @Select("select * from sy_metertype where id = #{value}")
    public SyMeterType queryById(Long id);

    @Delete("delete from sy_metertype where id = #{value}")
    public int delSyMeterType(Long id);

    @Insert("insert into sy_metertype values\n" +
            "(default,#{meterTypeName},#{aperture},#{mavValue},#{minValue},#{life},#{remark},0)")
    public int addSyMeterType(SyMeterType syMeterType);

    public int updateSyMeterType(SyMeterType syMeterType);
}
